package com.zyt.springboot.teach_factoryProxy.abstractFactory.aa;

import com.zyt.springboot.teach_factoryProxy.abstractFactory.Computer;
import com.zyt.springboot.teach_factoryProxy.simpleFactory.Phone;

/*
 * @params: 测试方法
 */
public class TestDemo {
    public static void main(String[] args) {
        AbstractFactory miFactory = new MiFactory();
        AbstractFactory huaweiFactory = new HuaweiFactory();
        //相当于获取了四个对象
        Phone makePhone = miFactory.makePhone();
        Computer makeComputer = miFactory.makeComputer();
        Phone makePhone2 = huaweiFactory.makePhone();
        Computer makeComputer2 = huaweiFactory.makeComputer();
        //然后调用这四个对象中的make方法
        makePhone.make();
        makeComputer.make();
        makePhone2.make();
        makeComputer2.make();
    }

}
